package org.cjstudio.holypoopsgrs.server;

import java.util.List;

import javax.jdo.PersistenceManager;

public interface Repository<T> {

	public void create(T obj);

	public T retrieve(String key);
	public List<T> retrieveAll();
	public List<T> retrieveWithRange(int start, int end);

	public void update(T obj);
	public UpdateParams<T> update(String key);

	public boolean delete(T obj);
	public boolean delete(String key);

	public static class UpdateParams<S> {
		public PersistenceManager pm;
		public S obj;
	}
}
